<template>
  <div>
    <h2 class="b-title">
      公开课
      <span>Open Courses</span>
      <a target="_blank" :href="more">More</a>
    </h2>

    <ul class="open-courses">
      <li v-for="item in list">
        <h3>
          <a target="_blank" :href="item.href">{{item.title}}</a>
        </h3>
        <p>
          {{item.timeInfo}}
        </p>
      </li>
    </ul>
  </div>
</template>

<script>
  import { mapState } from 'vuex'

  export default {
    name: 'openCourse',
    computed: mapState({
      list: state => state.home.openCourse.list,
      more: state => state.home.openCourse.more
    })/* ,
    methods: mapActions({
      getInfo: getOpenCourse
    }),
    created () {
      this.getInfo()
    } */
  }
</script>
